﻿using DoNet.Core;
using DoNet.System.Dtos;
using DoNet.System.Models;

namespace DoNet.System.IServices
{
    public interface IOrganizeService : IService<Organize, OrganizeOutputDto>
    {
        #region 同步方法
        /// <summary>
        /// 同步软删除状态变更时 deleteMark为true时子部门需要同步更新 deleteMark为false时父部门需要同步更新
        /// </summary>
        /// <param name="deleteMark">软删除状态</param>
        /// <param name="deleteUserId">软删除操作人Id</param>
        /// <param name="deleteTime">软删除操作时间</param>
        /// <param name="id">组织机构Id</param>
        /// <returns></returns>
        bool SetDeleteMark(bool deleteMark, long deleteUserId, DateTime deleteTime, long id);
        #endregion 同步方法
        #region 异步方法
        /// <summary>
        /// 异步软删除状态变更时 deleteMark为true时子部门需要同步更新 deleteMark为false时父部门需要同步更新
        /// </summary>
        /// <param name="deleteMark">软删除状态</param>
        /// <param name="deleteUserId">软删除操作人Id</param>
        /// <param name="deleteTime">软删除操作时间</param>
        /// <param name="id">组织机构Id</param>
        /// <returns></returns>
        Task<bool> SetDeleteMarkAsync(bool deleteMark, long deleteUserId, DateTime deleteTime, long id);
        #endregion 异步方法
    }
}
